<template>
  <div id="subpage">

    <el-col :span="24" class="warp-breadcrum">
      <el-breadcrumb separator="/">
        <el-breadcrumb-item><b>小程序</b></el-breadcrumb-item>
        <el-breadcrumb-item to="/mini_app/push_message">推送管理</el-breadcrumb-item>
        <el-breadcrumb-item>{{activity_id ? '修改' : '添加'}}推送</el-breadcrumb-item>
      </el-breadcrumb>
    </el-col>

    <div class="content">
      <div class="xcx-head">
        <span class="title">{{activity_id ? '修改' : '添加'}}推送</span>
      </div>
      <div class="xcx-content">
        <el-form ref="form_data" :model="form_data" :rules="rules" label-width="140px" style="width: 80%;">

          <el-form-item label="推送类型：" prop="type">
            <el-select @change="getTitle" v-model="form_data.type" class="w400" placeholder="请选择推送类型">
              <el-option v-for="(item, i) in type" :key="i" :label="item.name" :value="item.id"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="课题名称：" prop="title">
          <el-autocomplete
            class="w400"
            v-model="form_data.title"
            :fetch-suggestions="querySearchAsync"
            placeholder="请输入标题内容"
            @select="handleSelect"
            valueKey="title"
            clearable
          ></el-autocomplete>
          </el-form-item>
          
          <el-form-item label="推送底部文案：" prop="foot_txt">
            <el-input class="w400" v-model="form_data.foot_txt" placeholder="推送底部文案"></el-input>
          </el-form-item>

          <el-form-item class="mar_T_50">
            <el-button type="primary" @click="save">保存</el-button>
            <el-button @click="back">返回</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script src="../../../static/js/mini_app/add_push_message.js"></script>

<style scoped>

</style>
